//
//  LauDemoViewController.swift
//  SwiftProject
//
//  Created by Lausen on 2017/7/11.
//  Copyright © 2017年 id. All rights reserved.
//

import UIKit

class LauDemoViewController: LauBaseViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
    }
    
    ///展示下一个控制器
    @objc fileprivate func showNext(){
        
        let vc = LauDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
    }
    
}

//MARK: -- 设置界面
extension LauDemoViewController{
    
    override func setupTableView() {
        super.setupTableView()

        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
}
